<ion-content fullscreen>
    <img src="assets/image/back4.png" style="width:100%;height:260px" />
    <ion-segment value="login" (ionChange)="ionSegmentChange()" style="padding-left:10px;padding-right:10px">
        <ion-segment-button value="login">
            登录
        </ion-segment-button>
        <ion-segment-button value="register">
            注册
        </ion-segment-button>
    </ion-segment>

    <div id="login" *ngIf="isShowLogin">
        <ion-card>
            <ion-item>
                <ion-input [(ngModel)]="loginname" placeholder="请输入手机号/用户名" clearInput></ion-input>
            </ion-item>
            <ion-item>
                <ion-input [(ngModel)]="password" placeholder="请输入密码" type="password" clearInput></ion-input>
            </ion-item>
        </ion-card>
        <ion-item class="jzmm">
            <ion-label text-right style="padding:0px">是否记住密码</ion-label>
            <ion-toggle [(ngModel)]="checked"></ion-toggle>
        </ion-item>
        <div style="padding-left:10px;padding-right:10px">
            <ion-button expand="block" (click)="checklogin()">安全登录</ion-button>
        </div>
    </div>

    <div id="register" *ngIf="!isShowLogin">
        <ion-card>

            <ion-item>
                <ion-label>用户类型</ion-label>
                <ion-select cancelText="取消" okText="确定" placeholder="选择" [(ngModel)]="iusertype" (ngModelChange)="packagTypeChange()">
                    <ion-select-option value="2">金融机构用户</ion-select-option>
                    <ion-select-option value="3">企业用户</ion-select-option>
                </ion-select>
            </ion-item>
            <ion-item>
                <ion-label>所属机构</ion-label>
                <ion-select cancelText="取消" okText="确定" [(ngModel)]="iorgname" interface="action-sheet" placeholder="选择" (ngModelChange)="iorgnameChange()" selectedText="{{corgname}}">
                    <ion-select-option *ngFor="let item of orgitems;let i=index" value="{{item.iid}}">{{item.cname}}</ion-select-option>
                    <!--<ion-select-option  value="1">{{orgitems[0].cname}}</ion-select-option>-->
                </ion-select>
            </ion-item>
            <ion-item>
                <ion-input placeholder="用户名" [(ngModel)]="r_loginname" clearInput></ion-input>
            </ion-item>
            <ion-item *ngIf="isShowUnit">
                <ion-input placeholder="二级单位" [(ngModel)]="r_ejunits" clearInput></ion-input>
            </ion-item>
            <ion-item>
                <ion-input placeholder="请输入手机号" [(ngModel)]="r_phone" clearInput></ion-input>
            </ion-item>
            <ion-item>
                <ion-input placeholder="请输入验证码" [(ngModel)]="r_code" clearInput></ion-input>
                <ion-button [disabled]="!verifyCode.disable" (click)="getCode()">{{verifyCode.verifyCodeTips}}</ion-button>
            </ion-item>
            <ion-item>
                <ion-input type="{{isShowPwd?'text':'password'}}" placeholder='请输入密码' [(ngModel)]="r_password" clearInput></ion-input>
                <a href="javascript:;" (click)="isShowPwd=!isShowPwd" [ngClass]="isShowPwd?'eyeshow':'eyehide'">
                    <ion-icon name="ios-eye-off" color="dark" class="eye-hide"></ion-icon>
                    <!--闭眼图标-->
                    <ion-icon name="ios-eye" color="dark" class="eye-show"></ion-icon>
                    <!--睁眼图标-->
                </a>
            </ion-item>
            <ion-item>
                <ion-input placeholder="请确认密码" type="{{isShowPwd?'text':'password'}}" [(ngModel)]="r_password_qr" clearInput></ion-input>
            </ion-item>
        </ion-card>
        <div style="padding-left:10px;padding-right:10px">
            <ion-button expand="block" (click)="checkRegist()">注册</ion-button>
        </div>
    </div>

</ion-content>